#include "single_list.h"
#include "double_list.h"
#include "single_array.h"


void all_list_option(single_Node **S_head,Dlist **D_head)
{
	int i;
back:
	printf("\n\n\n");
	printf("==============链表操作选择菜单==============\n");
	printf("1.单链表\n");
	printf("2.双链表\n");
	printf("3.退出\n");
	printf("=======================================\n");
	printf("\n");
	printf("\n请输入数字：");
	scanf("%d",&i);
	printf("\n");
	switch(i)
	{
		case 1:
			single_list(S_head);
			break;
		case 2:
			double_list(D_head);
			break;
		case 6:
			break;
		default:
			return;
	}
	goto back;
}

int all_array_option(int *array,int len)
{
	int i;
back:
	printf("\n\n\n");
	printf("==============数组操作选择菜单==============\n");
	printf("1.一元数组\n");
	printf("2.二元数组\n");
	printf("3.退出\n");
	printf("=======================================\n");
	printf("\n");
	printf("\n请输入数字：");
	scanf("%d",&i);
	printf("\n");
	switch(i)
	{
		case 1:
			len=single_array_option(array,len);
			break;
		case 2:
			break;
		case 3:
			return len;
			break;
		default:
			goto back;
			break;
	}
	goto back;
	return len;
}


void main()
{
	
	int i;
	int array_len=0;
	single_Node *S_head=NULL;
	Dlist *D_head=NULL;
back:
	printf("\n");
	printf("==============主链表选择菜单==============\n");
	printf("1.数组\n");
	printf("2.链表\n");
	printf("3.队列\n");
	printf("4.栈\n");
	printf("5.堆\n");
	printf("6.图\n");
	printf("7.树\n");
	printf("8.散列表\n");
	printf("9.退出\n");
	printf("=======================================\n");
	printf("\n");
	printf("\n请输入数字：");
	scanf("%d",&i);
	printf("\n");
	switch(i)
	{
		case 1:
			array_len=all_array_option(array_before,array_len);
			break;
		case 2:
			all_list_option(&S_head, &D_head);
			break;
		case 3:
			break;
		case 4:
			break;
		case 5:
			break;
		case 6:
			break;
		case 7:
			break;
		case 8:
			break;
		case 9:
			return;
			break;
		default:
			printf("请重新选择！\n");
			goto back;
			return;
	}
	goto back;
}
/*
void main()
{
single_Node *S_head=NULL;
Dlist *D_head=NULL;
}
*/
